import java.util.HashMap;
import java.util.Map;

import bean.User;


public class No2 {
	
	//Method For Create User Map
	public static Map<String , Object> createTestUserMap() {
		
		Map<String , Object> map =  new HashMap<String, Object>() ;
		map.put("firstname", "Test FirstName 1");
		map.put("lastname", "Test LastName 1");
		return map;
	}
	
	public static void main(String[] args){
		
		// Create Example user
		Map<String , Object> testUserMap = No2.createTestUserMap();
		
		System.out.println("Map >> "+testUserMap);
		
		//Set map to bean
		User user = new User();
		user.setFirstName((String) testUserMap.get("firstname"));
		user.setLastName((String) testUserMap.get("lastname"));
		
		
		//For Insert To Database
		System.out.println("First Name : "+user.getFirstName());
		System.out.println("Last  Name : "+user.getLastName());
		
	}
}
